package com.dmx.fw.web.struts2.views.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.TextFieldTag;

import com.dmx.fw.web.struts2.components.ExtDate;
import com.dmx.fw.web.struts2.components.ExtTextField;
import com.opensymphony.xwork2.util.ValueStack;

public class ExtDateTag extends TextFieldTag {
	
	protected String pageState;
	protected String addState;
	protected String editState;
	protected String viewState;
	protected String outHidden;
	
	public Component getBean(ValueStack stack,HttpServletRequest req, HttpServletResponse res){
		return new ExtDate(stack,req,res);
	}
	
	protected void populateParams(){
		super.populateParams();
		
		ExtDate extDate = ((ExtDate)component);
		extDate.setPageState(pageState);
		extDate.setAddState(addState);
		extDate.setEditState(editState);
		extDate.setViewState(viewState);
		extDate.setOutHidden(outHidden);
		
	}

	public void setPageState(String pageState) {
		this.pageState = pageState;
	}

	public void setAddState(String addState) {
		this.addState = addState;
	}

	public void setEditState(String editState) {
		this.editState = editState;
	}

	public void setViewState(String viewState) {
		this.viewState = viewState;
	}

	public void setOutHidden(String outHidden) {
		this.outHidden = outHidden;
	}
	
	
}
